package com.company;

import java.text.SimpleDateFormat;
import java.util.Date;

public class JavaDate {

    public static void main(String[] args) {
        final Date now = new Date();
        System.out.println(now);
        SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
        String dateString = dateFormatter.format(now);
        System.out.println(dateString);
    }
}
